﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace TD.Interface
{
    abstract class PopMenuBase : MenuBase
    {
        private Texture2D background;

        public PopMenuBase(Game1 game) :
            base(game)
        {
            base.DrawOrder = 0x08400000;
        }

        protected override void LoadContent()
        {
            ((Game1)Game).TextureManager.LoadAsset("interface\\popmenu_shader");
            background = ((Game1)Game).TextureManager.UseAsset("interface\\popmenu_shader");
            
            base.LoadContent();
        }

        public override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);
            spriteBatch.Draw(background, new Rectangle(0, 0, 1280, 720), Color.White);
            spriteBatch.End();
            
            base.Draw(gameTime);
        }
    }
}
